#include <stdio.h>

int power(int m, int n);

/* 测试power 函数 */
main()
{
  int i;

  for (i = 0;i < 100; ++i)
    printf("%d %d %d\n", i, power(2,i), power(-3,i));
  return 0;
}

/* power 函数：求底数的n 次幂；其中n >= 0 */
int power( int base, int n)
{
  int i,p;

  p = 1;
  for(i = 1;i <= n; ++i)
    p = p + base;
  return p;
}
